﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TMTemplate
{
	public partial class FullScreen : UserControl
	{
		public FullScreen()
		{
			
			InitializeComponent();
			VisualStateManager.GoToState(this, "Normal", false);
            MouseEnter += new MouseEventHandler((s, e) => { VisualStateManager.GoToState(this, "Enter", false); });
            MouseLeave += new MouseEventHandler((s, e) => { VisualStateManager.GoToState(this, "Normal", false); });
            MouseLeftButtonUp += new MouseButtonEventHandler(Click);
		}

        void Click(object sender, MouseButtonEventArgs e)
        {
            if (Application.Current.Host.Content.IsFullScreen)
            {
                Application.Current.Host.Content.IsFullScreen = false;
            }
            else
            {
                Application.Current.Host.Content.IsFullScreen = true;
            }
        }
	}
}